#include "DTOExplosion.h"

DTOExplosion::DTOExplosion(int x,int y,std::string owner)
:DTO(NEW_EXPLOSION,owner){
	this->x = x;
	this->y = y;
}

DTOExplosion::DTOExplosion(std::string& aDeserealizar, std::string owner) :
		DTO(NEW_EXPLOSION, owner) {
	deserializar(aDeserealizar, owner);
}

std::string DTOExplosion::serializar(){
	std::stringstream retorno;

	retorno << UtilString::TOlenghtStringStringValue(x);
	retorno << UtilString::TOlenghtStringStringValue(y);

	return retorno.str();
}

void DTOExplosion::deserializar(std::string& string,std::string owner){
	x = UtilString::stringToInt(UtilString::FROMlenghtStringStringValue(string));
	y = UtilString::stringToInt(UtilString::FROMlenghtStringStringValue(string));
}
